.theme__sheet {
	max-width: none;
}

.theme__sheet-bar
{
	background-color: $blue-wordpress;
	color: white;
	height: 180px;
	padding: 0;
	margin: 0;
}

.theme__sheet-bar-title {
	display: block;
	font-size: 33px;
	font-weight: 100;
	padding-top: 70px;
	padding-left: 25px;
	line-height: 1;
}

.theme__sheet-bar-tag {
	max-width: none;
	display: block;
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
	font-weight: 200;
	padding-top: 5px;
	padding-left: 25px;
}

.theme__sheet-columns {
	display: flex;
	flex-direction: row;

	@include breakpoint( "<960px" ) {
		flex-direction: column-reverse;
	}
}

.theme__sheet-column-left,
.theme__sheet-column-right {
	display: flex;
	width: 50%;
	flex-direction: column;

	@include breakpoint( "<960px" ) {
		width: 100%;
	}
}

.theme__sheet-action-bar {
	height: 50px;

	@include breakpoint( "<960px" ) {
		&.card {
			margin: 0 0 1px 0;
		}
	}
}

.theme__sheet-primary-button {
	position: absolute;
		top: 5px;
		right: 50%;
	margin-right: 20px;

	@include breakpoint( "<960px" ) {
		margin-right: 0;
		position: absolute;
			top: 5px;
			right: 5px;
	}
}

.theme__sheet-button-placeholder {
	color: transparent;
}

.theme__sheet-action-bar-cost {
	font-weight: 600;
	color: #4AB866;
	margin-left: 10px;
	display: inline-block;
	max-width: 50%;
}

.theme__sheet-screenshot {
	display: block;
	position: relative;
	top: -156px;
	width: 98%;
	box-shadow: 0px 2px 8px 0px rgba(46,68,83,0.45);
	background-color: transparentize( white, 0.5 );

	// with width: 98%, gives 4:3 ratio before the image loads
	// also x-browser issues, so it's smaller than 4:3 proper
	min-height: 36.15vw; // 36.75vw would be correct, but Safari is slightly off

	@include breakpoint( "<960px" ) {
		position: relative;
		top: 0;
		width: 100%;
		height: 75vw; // force proportions
		overflow: hidden;
		box-shadow: none;

		&:before {
			content: "";
			display: block;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 30%;
			background: linear-gradient( to bottom, transparentize( $gray-light, 1.0 ) 0%, transparentize( $gray-light, 0.5 ) 40%, $gray-light 93% );
		}
	}
}

.theme__sheet-img {
	display: block;
	width: 100%;
}

.theme__sheet-content {
	padding: 20px;
	font-size: 14px;

	min-height: 400px; // whilst loading

	div {
		width: auto !important; // override inline style in content markup
	}

	p:last-child {
		margin-bottom: 0;
	}

	img {
		&.aligncenter {
			max-width: 100%;
			display: block;
			margin: 20px auto;
			border: 1px solid $gray-light;
		}

		&.alignright,
		&.alignleft {
			max-width: 100%;
			margin: 7px 0 20px;
		}

		&.alignright {
			float: right;
			margin-left: 20px;
		}

		&.alignleft {
			float: left;
			margin-right: 20px;
		}
	}

	.wp-caption {
		margin-bottom: 20px;
	}

	.wp-caption-text {
		color: $gray;
		font-size: 12px;
	}

	h2 {
		color: $gray;
		font-size: 14px;
		font-weight: 400;

		margin: -20px -20px 20px;
		padding: 15px 20px 15px;
		border-bottom: 1px solid #dce5eb;

		&:nth-child(n+2) {
			// Everything except the first
			border-top: 1px solid #dce5eb;
			margin: 20px -20px 20px;
			padding: 15px 20px 15px;

			&:before {
				// The "fake" Card separation
				content: "";
				display: block;
				height: 15px;
				margin: -15px -21px 15px;
				border-bottom: 1px solid #dce5eb;
				background: #f3f6f8;
			}
		}
	}

	h3 {
		font-size: 20px;
		font-weight: 200;
		margin: 40px 0 10px;
	}

	h4 {
		font-size: 18px;
		font-weight: 200;
		margin: 40px 0 10px;
	}

	h5 {
		font-size: 16px;
		font-weight: 200;
		margin: 40px 0 10px;
	}

	h6 {
		font-size: 14px;
		font-weight: 200;
		margin: 40px 0 10px;
	}

	pre {
		font-family: $code;
		font-size: 14px;
		white-space: pre-wrap;
		padding: 8px;
	}

	code {
		font-size: 14px;
		background: $gray-light;
		padding: 1px 4px;
		border-radius: 2px;
	}

	blockquote {
		padding: 30px;
		margin: 0 -20px;
		border-left: 2px solid $gray;
	}

	.notes {
		background: $gray-light;
		margin: 40px -20px 40px;
		border-top: 1px solid #e9eff3;
		border-bottom: 1px solid #e9eff3;
		padding: 20px;

		font-size: 13px;
		line-height: 21px;

		&>p:first-child {
			color: $gray;
			font-weight: 600;
			margin: 0 0 14px;
		}

		ol {
			margin-left: 20px;
		}

		code {
			font-size: 11px;
			background: #ffffff;
			padding: 2px 4px;
			border-radius: 4px;
		}

		:last-child {
			margin-bottom: 5px;
		}

		&:last-child {
			margin-bottom: -20px;
			border-bottom: 0;
		}
	}
}

.theme__sheet-placeholder {
	color: transparent;
	background-color: rgba(255, 255, 255, 0.4);
	animation: loading-fade 1.6s ease-in-out infinite;
}

.theme__sheet-features-list {
	text-align: center;
	margin: -10px;
	padding: 0;

	a {
		display: inline-block;
		position: relative;
		background: lighten( $gray, 30% );
		color: $gray-dark;
		margin: 4px;
		padding: 2px 12px;
		border-radius: 3px;
		transition: all 100ms ease-in;

		&:after {
			content: "";
			pointer-events: none;
			position: absolute;
			width: 100%;
			height: 100%;
			border-radius: 3px;
			background: $blue-dark;
			top: 0;
			left: 0;
			padding: 0;
			z-index: -1;
			transform: scale(0.9, 0.9);
			transition: transform 300ms, opacity 400ms;
		}

		&:hover {
			color: $white;
			background-color: $blue-dark;

			&:after {
				transform: scale(1.07, 1.16);
			}
		}
	}

	li {
		list-style: none;
		display: inline-block;
		position: relative;
		z-index: 0;
	}
}

.theme__sheet-card-support {
	display: flex;
	align-items: center;

	&:not(:last-child) {
		margin-bottom: 0;
	}

	@include breakpoint( "<960px" ) {
		flex-wrap: wrap;
	}

	.gridicon {
		color: lighten( $gray, 20% );
		flex: 0 0 auto;
	}

	.button {
		flex: 0 0 auto;

		@include breakpoint( "<960px" ) {
			flex: 1 1 100%;
			margin-top: 20px;
			text-align: center;
		}
	}
}

.theme__sheet-card-support-details {
	flex: 1 1 20px;
	padding: 0 20px;

	small {
		display: block;
		color: $gray;
	}
}

.theme__sheet-preview-link {
	display: flex;
	position: absolute;
		top: -28px;
	color: lighten( $gray, 30% );
	cursor: pointer;
	transition: all ease-in-out 100ms;

	&:hover {
		color: $white;
	}

	.gridicon {
		margin: 0 8px 0 -4px;
	}

	.theme__sheet-preview-link-text {
		font-size: 12px;
		margin-top: 2px;
		text-transform: uppercase;
	}

	@include breakpoint( "<960px" ) {
		color: transparentize( $gray, 0.2 );
		top: 90%;
		margin-left: 30px;

		&:hover {
			color: $gray-dark;
		}

		.gridicon {
			width: 24px;
			height: 24px;
		}

		.theme__sheet-preview-link-text {
			display: none;
		}
	}
}

.theme__sheet-footer-line {
	color: lighten( $gray, 20% );
	border-top: 1px solid lighten( $gray, 20% );
	margin: 32px 0 20px;

	.gridicon {
		display: block;
		margin: -12px auto 0;
		background: $gray-light;
	}
}

.theme__sheet-content-presentation-image {
	// This is used in conjunction with the theme content output.
	// NOT to be used anywhere in Calypso UI.
	display: none;
}
